/*********************************************************************
*
*   DigitalOutput.h - Digital output class
*
*   Copyright:
*       Software source code by Alex Morozov and Chris D. Locke is
*       licensed under a Creative Commons Attribution-Noncommercial-
*       Share Alike 3.0 United States License
*       (http://creativecommons.org/licenses/by-nc-sa/3.0/us/)
*
*********************************************************************/

#pragma once
#include "CppBot_types.h"

/*----------------------------------------------------------
Digital output class
----------------------------------------------------------*/
class DigitalOutput
{
public:
    explicit DigitalOutput(UINT32 channel);
    DigitalOutput(UINT32 slot, UINT32 channel);
    ~DigitalOutput();
    void Set(UINT32 value);
    void Pulse(float length);
    bool IsPulsing();

private:
    void InitDigitalOutput(UINT32 slot, UINT32 channel);

    UINT32 m_channel;
    uint32 m_slot;
    //CDL DigitalModule *m_module;
};
